<include file="Public/head" />

<body>
  <div class="panel admin-panel">
    <div class="panel-head"><strong><span class="icon-pencil-square-o"></span> {:L("shangjiaxinxi")}</strong></div>
    <div class="body-content">
      <form method="post" class="form-x" action="" enctype="multipart/form-data">
        <!--<div class="form-group">-->
          <!--<div class="label">-->
            <!--<label>{:L("dengluzhanghao")}：</label>-->
          <!--</div>-->
          <!--<div class="field">-->
            <!--<input type="text" class="input w50" name="user_name" value="{$info['user_name']}" data-validate="required:{:L('qingshuru')}{:L('dengluzhanghao')}"/>-->
            <!--<div class="tips"></div>-->
          <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
          <!--<div class="label">-->
            <!--<label>{:L("denglumima")}：</label>-->
          <!--</div>-->
          <!--<div class="field">-->
            <!--<input id="password" type="text" class="input w50" name="password" value="" placeholder="{$info['password']}" />-->
            <!--<div class="tips"></div>-->
          <!--</div>-->
        <!--</div>-->
        <div class="form-group">
          <div class="label">
            <label>{:L("shanghumingzi")}：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="company_name" value="{$info['company_name']}" data-validate="required:{:L('qingshuru')}{:L('shanghumingzi')}"/>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>{:L("shanghulogo")}：</label>
          </div>
          <div class="field">
            <input type="file" class="button bg-blue" name="company_logo" value="+ {:L('liulanshangchuan')}" onchange="preview(this)" style="float: left;">
            <div id="preview" name="img" style="float: left;width: 10%;box-sizing: border-box;" class="input" >
              <empty name="info['company_logo']">
                <img src="__PUBLIC__/images/zanwu.jpg" width="100%" />
                <else />
                <img src="__ROOT__/{$info['company_logo']}" width="100%" />
              </empty>
            </div>
            <div class="tipss">{:L("tuijianchicun")}：100*100</div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>{:L("lianxiren")}：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="full_name" value="{$info['full_name']}" />
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>{:L("lianxishouji")}：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="tel" value="{$info['tel']}" />
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label></label>
          </div>
          <div class="field">
            <button class="button bg-main icon-check-square-o" type="submit"> {:L("tijiao")}</button>
          </div>
        </div>
      </form>
    </div>
  </div>
  <script type="text/javascript">
    function preview(file){
      var prevDiv = document.getElementById('preview');
      if (file.files && file.files[0]){
        var reader = new FileReader();
        reader.onload = function(evt){
          prevDiv.innerHTML = '<img src="' + evt.target.result + '" width="100%" />';
        }
        reader.readAsDataURL(file.files[0]);
      }
      else{
        prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
      }
    }
  </script>
</body>

</html>